<?php
class Cuota extends Modelo_base {

	var $table = 'cuotas';

	var $has_one = array("historial_plan");

	// Validaciones de campos
	var $validation = array(
    	'periodo' => array(
	        'label' => 'Período',
	        'rules' => array('required', 'is_natural')
			),
		'importe' => array(
	        'label' => 'Importe',
	        'rules' => array('required', 'numeric')
			),
        'historial_plan' => array(
            'label' => 'Historial Plan', // Esta validación siempre debería ser correcta
            'rules' => array('required')
        	),
        'fecha_cobro' => array(
            'label' => 'Fecha de cobro',
            'rules' => array('prepararFecha', 'valid_date'),
            'get_rules' => array('allow_null', 'prepararFecha')
            )
	);

    // Optionally, don't include a constructor if you don't need one.
    function __construct($id = NULL)
    {
        parent::__construct($id);
    }
}

/* End of file cuota.php */
/* Location: ./application/models/cuota.php */